<template>
  <div class="con-box">
    <div class="tit" @click.stop="handleTitleClick"  v-if="showTitle">
      <img class="tit-img" src="@/assets/images/box_tit.png" alt=""/>
      <span :style="isCurpointer ? 'cursor: pointer' : ''">{{ title }}</span>
      <div class="select-con">
        <slot name="header"></slot>
      </div>
    </div>
    <div class="con">
      <slot></slot>
    </div>
  </div>
</template>

<script>
// iui
export default {
  name: "ConBox",

  components: {},
  props: {
    height: {
      type: String,
      default: "h-353",
    },
    title: {
      type: String,
      default: "劳动生产率",
    },
    isCurpointer: {
      type: Boolean,
      default: false,
    },
    showTitle:{
      type:Boolean,
      default:true
    }
  },
  data() {
    return {
      // fui
    };
  },
  computed: {},
  created() {},
  methods: {
    // hui
    handleTitleClick() {
      this.$emit("routerGo");
    },
  },
};
</script>

<style scoped lang="scss">
// jui

.con-box {
  position: relative;
  // width: 500px;
  // height: 400px !important;
  background: linear-gradient(0deg, rgba(6, 15, 25, 0.91), rgba(20, 25, 32, 0.6));
  border-radius: 6px;
  border: 1px solid rgba(25, 45, 63, 0.5);
  .tit {
    position: relative;
    width: 100%;
    height: 69px;
    img {
      width: 430px;
      height: 64px;
    }
    span {
      position: absolute;
      left: 56px;
      top: 0px;
      font-size: 22px;
      line-height: 55px;
      background-image: -webkit-linear-gradient(bottom, #dce0e4, #ccdae6, #dce0e4);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .select-con {
      position: absolute;
      z-index: 99;
      top: 18px;
      right: 32px;
      font-size: 14px;
      color: #758a9c;
      cursor: pointer;
    }
  }

  .con {
    height: calc(100% - 70px);
    // overflow: hidden;
    background-color: transparent;
  }
}
</style>
